<!--20210304   zaq   修改个人信息、有话要说、日历路由-->
<!--20210309   zaq   修改data中的user变量，与sql表一致-->
<!--20210513   zaq   修改按钮组件样式，修改主页路由为'/',新增更新日志-->
<!--20210604   zaq   修改菜单名称-->
<!--20210607   zaq   引入快速添加路由-->


<!--导航栏-->
<template>
  <div>
    <el-container>
      <el-aside width="200px">
        <el-button-group style=";background-color:rgba(0,0,0,0.2) ">
          <router-link to="/home">
            <el-button  type="primary" style="width: 200px;height: 4em" plain>
              主页
          </el-button>
          </router-link><br>
          <router-link to="/book"><el-button type="primary" style="width: 200px;height: 4em" plain>星球记账本</el-button></router-link><br>
          <router-link to="/calendar"><el-button type="primary" style="width: 200px;height: 4em" plain>星球日历</el-button></router-link><br>
          <router-link to="/text"><el-button type="primary" style="width: 200px;height: 4em" plain>有话要说</el-button></router-link><br>
          <router-link to="/quickAdd"><el-button type="primary" style="width: 200px;height: 4em" plain>快速添加</el-button></router-link><br>
          <router-link to="/user"><el-button  type="primary" style="width: 200px;height: 4em" plain>个人信息</el-button></router-link><br>
          <router-link v-if="admin=='1'" to="/log"><el-button  type="primary" style="width: 200px;height: 4em" plain>操作日志</el-button></router-link><br v-if="admin==1">
          <router-link to="/history"><el-button type="primary" style="width: 200px;height: 4em" plain>更新日志</el-button></router-link>
        </el-button-group>
      </el-aside>
    </el-container>
  </div>
</template>

<script>
export default {
  name: "Header",
  props:{
  },
  mounted() {
    this.admin=sessionStorage.getItem("admin")
  },
  methods:{
    // //跳转到个人信息界面
    // toUser(){
    //   this.$router.push(
    //       {
    //         path:'/user',
    //         params:{user:this.user},
    //       }
    //   )
    // },
  },
  data(){
    return{
      admin:0,
    }
  }
}
</script>

<style scoped>
</style>